Class Prim
java.lang.Object
edu.claflin.finder.algo.Algorithm
edu.claflin.finder.algo.spanningtree.ExtremumSpanningTree
edu.claflin.finder.algo.spanningtree.Prim
- All Implemented Interfaces:
Processable<Graph,Graph>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classprivate classNested classes/interfaces inherited from class edu.claflin.finder.algo.Algorithm
Algorithm.GraphSortOrder -
Field Summary
FieldsFields inherited from class edu.claflin.finder.algo.spanningtree.ExtremumSpanningTree
max, thresholdFields inherited from class edu.claflin.finder.algo.Algorithm
args, PROP_PROGRESS -
Constructor Summary
ConstructorsConstructorDescriptionPrim(ArgumentsBundle bundle) Public constructor for initializing the Prim with default conditions. -
Method Summary
Modifier and TypeMethodDescriptionProcesses data.private voidstartSearch(PrioritySet<Prim.DistanceRecord> ps, List<Node> treeList, List<Node> remainingNodes, Graph graph) toString()Methods inherited from class edu.claflin.finder.algo.spanningtree.ExtremumSpanningTree
edgeMeetsThreshold, getNameMethods inherited from class edu.claflin.finder.algo.Algorithm
addPropertyChangeListener, cull, getGraphSortOrder, getMinNodeCount, getPartiteNumber, getWeightName, removePropertyChangeListener, setGraphSortOrder, setMinNodeCount, setPartiteNumber, setProgress, setWeightName, zeropad
-
Field Details
-
startNode
-
-
Constructor Details
-
Prim
Public constructor for initializing the Prim with default conditions.- Parameters:
bundle- the ArgumentsBundle containing the instantiation arguments.
-
-
Method Details
-
toString
-
process
Processes data.
Finds the Minimum Spanning Tree MST with Prim's algorithm.- Parameters:
graph- theGraphobject to search through.- Returns:
- the ArrayList of Graph objects holding the MST.
-
startSearch
private void startSearch(PrioritySet<Prim.DistanceRecord> ps, List<Node> treeList, List<Node> remainingNodes, Graph graph)
-